﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>Plupload示例</title>

    <link href="~/assets/plupload/jquery.plupload.queue/css/jquery.plupload.queue.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-1.10.2.min.js"></script>
    <script src="~/assets/plupload/plupload.full.min.js"></script>
    <script src="~/assets/plupload/jquery.plupload.queue/jquery.plupload.queue.min.js"></script>
   
    <script src="~/assets/plupload/i18n/zh_CN.js"></script>
</head>
<body>
    <form method="post" action="@Url.Action("Upload", "Test")">
        <div id="uploader">
            <p>Your browser doesn't have Flash, Silverlight or HTML5 support.</p>
        </div>
        <button id="btn_browse">添加文件</button>
        <input type="submit" value="Send" />
    </form>
    <script type="text/javascript">
        $(function () {

            $("#uploader").pluploadQueue({
                // 常规设置
                runtimes: 'html5,flash,silverlight,html4',
                url: '@Url.Action("Upload", "Test")',
                browse_button: 'btn_browse',
                chunk_size: '1mb',
                rename: true,
                dragdrop: true,

                // Views to activate
                views: {
                    list: true,
                    thumbs: true, // Show thumbs
                    active: 'thumbs'
                },

                filters: {
                    // 最大文件尺寸
                    max_file_size: '1024mb',
                    // 支持文件类型
                    mime_types: [
                        { title: "Image files", extensions: "jpg,gif,png" },
                        { title: "Zip files", extensions: "zip" },
                        {title:"Media files",extensions:"mp4,wmv"}
                    ]    
                },

                // 缩略图质量和尺寸
                resize: { width: 320, height: 240, quality: 90 },

                flash_swf_url: '@Url.Content("~/assets/plupload/Moxie.swf")'
            });

        });
    </script>


</body>
</html>
